#include <platform/platform.h>
#include <platform/SDL2.h>
#include <SDL2/SDL.h>

static int platform_SDL2_open(
    const char *name,
    int width,
    int height,
    int flags
) {
    SDL_Window* window =0;
    SDL_Renderer* render=0;
    SDL_Init(SDL_INIT_EVERYTHING);
    window=SDL_CreateWindow(name,SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,width,height,SDL_WINDOW_SHOWN);
    render=SDL_CreateRenderer(window,-1,0);
    SDL_SetRenderDrawColor(render,0,255,0,255);
    SDL_RenderClear(render);
    SDL_RenderPresent(render);

    return 0;
}

int gato_init_platform_SDL2()
{
    platform_SDL2_open("gato", 400, 300, 0);
    return 0;
}

int gato_exit_platform_SDL2()
{
    return 0;
}